package HUZ_FileIO;

import java.io.File;
import java.util.Arrays;
import java.util.Objects;
import java.util.stream.Stream;

public class test {
    public static void main(String[] args) {
//        char[]arr=new char[10];
//        arr[0]='a';
//        arr[1]='b';
//
//        //Arrays.stream(arr)


//        File file=new File("E:\\Java网络通信程序\\TestDemo1");
//        File[] files = file.listFiles();
//        Stream<File> stream = Arrays.stream(files);
//        Object[] objects =  stream
//                .filter(fileIndex -> fileIndex.getName().equals("file.txt"))
//                .toArray();
////            .forEach(fileIndex-> System.out.println(fileIndex.getName()));
//
//        System.out.println(objects[0]);

        Thread thread=new Thread();
        Thread thread1=new Thread("First Thread");
        System.out.println("创建的线程名字："+thread1.getName());
        System.out.println("================");

        Thread thread2=new Thread(()->{System.out.println(Thread.currentThread().getName()+"：创建成功");},
                "Second Thread");
        thread2.start();

    }
}
